const { createProxyMiddleware } = require('http-proxy-middleware')

module.exports = function (app) {
	app.use(
		createProxyMiddleware('/robot-chat', {
			target: 'http://poc-api.alixiaomi.com',
			secure: false,
			changeOrigin: true,
			pathRewrite: {
				'/robot-chat': ''
			}
		})
	)
}
